import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path:'/',
      name:'Home',
      component:()=>import('../components/home/home.vue'),
      redirect:'/index',
      children:[
        //首页
        {
          path:'/index',
          name:"Index",
          component:()=>import('../components/Index/index.vue'),
        },
        //分类
        {
          path:'/kind',
          name:'kind',
          component:()=>import('../components/kind/kind.vue')
        },
        //订单
        {
          path:'/order',
          name:'order',
          component:()=>import('../components/Order/order.vue')
        },
          //我的
        {
          path:'/my',
          name:'my',
          component:()=>import('../components/My/my.vue') 
        }
      ]
    }
  ]
})
